映迷[V2].js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. var rule = {
  2. title: '映迷[V2]', // csp_AppYsV2
  3. host: 'https://www.inmi.app/xgapp.php/v1/',
  4. url: 'video?tid=fyclassfyfilter&limit=20&pg=fypage',
  5. filter_url:'&class={{fl.class}}&area={{fl.area}}&lang={{fl.lang}}&letter={{fl.letter}}&year={{fl.year}}&by={{fl.by}}',
  6. filter:{
  7. "20":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"爱情","v":"爱情"},{"n":"动作","v":"动作"},{"n":"喜剧","v":"喜剧"},{"n":"战争","v":"战争"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"武侠","v":"武侠"},{"n":"冒险","v":"冒险"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"微电影","v":"微电影"},{"n":"其它","v":"其它"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陸","v":"大陸"},{"n":"香港","v":"香港"},{"n":"台灣","v":"台灣"},{"n":"美國","v":"美國"},{"n":"韓國","v":"韓國"},{"n":"日本","v":"日本"},{"n":"泰國","v":"泰國"},{"n":"新加坡","v":"新加坡"},{"n":"馬來西亞","v":"馬來西亞"},{"n":"印度","v":"印度"},{"n":"英國","v":"英國"},{"n":"法國","v":"法國"},{"n":"加拿大","v":"加拿大"},{"n":"西班牙","v":"西班牙"},{"n":"俄羅斯","v":"俄羅斯"},{"n":"其它","v":"其它"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"國語","v":"國語"},{"n":"英語","v":"英語"},{"n":"粵語","v":"粵語"},{"n":"閩南語","v":"閩南語"},{"n":"韓語","v":"韓語"},{"n":"日語","v":"日語"},{"n":"法語","v":"法語"},{"n":"德語","v":"德語"},{"n":"泰語","v":"泰語"},{"n":"俄語","v":"俄語"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"2003","v":"2003"},{"n":"2002","v":"2002"},{"n":"2001","v":"2001"},{"n":"2000","v":"2000"}]}],
  8. "21":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"爱情","v":"爱情"},{"n":"动作","v":"动作"},{"n":"喜剧","v":"喜剧"},{"n":"战争","v":"战争"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"武侠","v":"武侠"},{"n":"冒险","v":"冒险"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"微电影","v":"微电影"},{"n":"其它","v":"其它"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陸","v":"大陸"},{"n":"香港","v":"香港"},{"n":"台灣","v":"台灣"},{"n":"美國","v":"美國"},{"n":"韓國","v":"韓國"},{"n":"日本","v":"日本"},{"n":"泰國","v":"泰國"},{"n":"新加坡","v":"新加坡"},{"n":"馬來西亞","v":"馬來西亞"},{"n":"印度","v":"印度"},{"n":"英國","v":"英國"},{"n":"法國","v":"法國"},{"n":"加拿大","v":"加拿大"},{"n":"西班牙","v":"西班牙"},{"n":"俄羅斯","v":"俄羅斯"},{"n":"其它","v":"其它"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"國語","v":"國語"},{"n":"英語","v":"英語"},{"n":"粵語","v":"粵語"},{"n":"閩南語","v":"閩南語"},{"n":"韓語","v":"韓語"},{"n":"日語","v":"日語"},{"n":"法語","v":"法語"},{"n":"德語","v":"德語"},{"n":"泰語","v":"泰語"},{"n":"俄語","v":"俄語"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"2003","v":"2003"},{"n":"2002","v":"2002"},{"n":"2001","v":"2001"},{"n":"2000","v":"2000"}]}],
  9. "22":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"爱情","v":"爱情"},{"n":"动作","v":"动作"},{"n":"喜剧","v":"喜剧"},{"n":"战争","v":"战争"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"武侠","v":"武侠"},{"n":"冒险","v":"冒险"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"微电影","v":"微电影"},{"n":"其它","v":"其它"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陸","v":"大陸"},{"n":"香港","v":"香港"},{"n":"台灣","v":"台灣"},{"n":"美國","v":"美國"},{"n":"韓國","v":"韓國"},{"n":"日本","v":"日本"},{"n":"泰國","v":"泰國"},{"n":"新加坡","v":"新加坡"},{"n":"馬來西亞","v":"馬來西亞"},{"n":"印度","v":"印度"},{"n":"英國","v":"英國"},{"n":"法國","v":"法國"},{"n":"加拿大","v":"加拿大"},{"n":"西班牙","v":"西班牙"},{"n":"俄羅斯","v":"俄羅斯"},{"n":"其它","v":"其它"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"國語","v":"國語"},{"n":"英語","v":"英語"},{"n":"粵語","v":"粵語"},{"n":"閩南語","v":"閩南語"},{"n":"韓語","v":"韓語"},{"n":"日語","v":"日語"},{"n":"法語","v":"法語"},{"n":"德語","v":"德語"},{"n":"泰語","v":"泰語"},{"n":"俄語","v":"俄語"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"2003","v":"2003"},{"n":"2002","v":"2002"},{"n":"2001","v":"2001"},{"n":"2000","v":"2000"}]}],
  10. "23":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"爱情","v":"爱情"},{"n":"动作","v":"动作"},{"n":"喜剧","v":"喜剧"},{"n":"战争","v":"战争"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"武侠","v":"武侠"},{"n":"冒险","v":"冒险"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"微电影","v":"微电影"},{"n":"其它","v":"其它"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"大陸","v":"大陸"},{"n":"香港","v":"香港"},{"n":"台灣","v":"台灣"},{"n":"美國","v":"美國"},{"n":"韓國","v":"韓國"},{"n":"日本","v":"日本"},{"n":"泰國","v":"泰國"},{"n":"新加坡","v":"新加坡"},{"n":"馬來西亞","v":"馬來西亞"},{"n":"印度","v":"印度"},{"n":"英國","v":"英國"},{"n":"法國","v":"法國"},{"n":"加拿大","v":"加拿大"},{"n":"西班牙","v":"西班牙"},{"n":"俄羅斯","v":"俄羅斯"},{"n":"其它","v":"其它"}]},{"key":"lang","name":"语言","value":[{"n":"全部","v":""},{"n":"國語","v":"國語"},{"n":"英語","v":"英語"},{"n":"粵語","v":"粵語"},{"n":"閩南語","v":"閩南語"},{"n":"韓語","v":"韓語"},{"n":"日語","v":"日語"},{"n":"法語","v":"法語"},{"n":"德語","v":"德語"},{"n":"泰語","v":"泰語"},{"n":"俄語","v":"俄語"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"},{"n":"2003","v":"2003"},{"n":"2002","v":"2002"},{"n":"2001","v":"2001"},{"n":"2000","v":"2000"}]}]
  11. },
  12. detailUrl:'/detail?vod_id=fyid',
  13. searchUrl: '/search?text=**&pg=fypage',
  14. searchable: 2,
  15. quickSearch: 0,
  16. filterable:1,//是否启用分类筛选,
  17. headers:{'User-Agent':'okhttp/4.1.0'},
  18. timeout:5000,
  19. // 分类筛选 /api.php/app/nav || /xgapp.php/v1/nav || /api.php/v1.vod/types
  20. class_name:'电影&電視劇&動漫&綜藝',
  21. class_url:'20&21&22&23',
  22. play_parse:true,
  23. lazy:`js:
  24. let play_Url = '';
  25. if (/\\.m3u8|\\.mp4/.test(input)) {
  26. input = {
  27. jx: 0,
  28. url: input,
  29. parse: 0
  30. }
  31. } else if (/,/.test(input) && /url=/.test(input)) {
  32. input = input.split('url=');
  33. play_Url = input[0].split(',')[0];
  34. input = {
  35. jx: 0,
  36. url: input[1],
  37. playUrl: play_Url,
  38. parse: 1
  39. }
  40. } else if (/url=|id=/.test(input)) {
  41. input = {
  42. jx: 0,
  43. url: JSON.parse(request(input)).url,
  44. parse: 0
  45. }
  46. } else if (/youku|iqiyi|v\\.qq\\.com|pptv|sohu|le\\.com|1905\\.com|mgtv|bilibili|ixigua/.test(input)) {
  47. play_Url = /bilibili/.test(input) ? 'https://jx.xmflv.com/?url=' : 'https://jx.777jiexi.com/player/?url='; // type0的parse
  48. // play_Url = /bilibili/.test(input) ? 'https://jx.xmflv.com/?url=' : 'json:http://pandown.pro/app/kkdy.php?url='; // type1的parse可加'json:'直接解析url (除了蜂蜜的'影视TV',其它的壳皆可用)
  49. input = {
  50. jx: 0,
  51. url: input,
  52. playUrl: play_Url,
  53. parse: 1,
  54. header: JSON.stringify({
  55. 'user-agent': 'Mozilla/5.0',
  56. }),
  57. }
  58. } else {
  59. input
  60. }
  61. `,
  62. limit:6,
  63. // 图片来源:'@Referer=https://api.douban.com/@User-Agent=Mozilla/5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/113.0.0.0%20Safari/537.36',
  64. 推荐:`js:
  65. let d = [];
  66. let jsondata = [];
  67. let videoList = [];
  68. if (/v1\\.vod/.test(HOST)) {
  69. if(HOST.endsWith('/')){
  70. jsondata = JSON.parse(request(HOST + 'vodPhbAll'));
  71. } else {
  72. jsondata = JSON.parse(request(HOST + '/vodPhbAll'));
  73. }
  74. videoList = jsondata.data.list;
  75. } else {
  76. if(HOST.endsWith('/')){
  77. jsondata = JSON.parse(request(HOST + 'index_video'));
  78. } else {
  79. jsondata = JSON.parse(request(HOST + '/index_video'));
  80. }
  81. videoList = /xgapp/.test(HOST) ? jsondata.data : jsondata.list;
  82. }
  83. // log('videoList =========> '+stringify(videoList));
  84. videoList.forEach((it,idex) => {
  85. let vlist = /v1\\.vod/.test(HOST) ? videoList[idex].vod_list : videoList[idex].vlist ;
  86. vlist.forEach(it => {
  87. d.push({
  88. url:it.vod_id,
  89. title:it.vod_name,
  90. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  91. desc:it.vod_remarks,
  92. });
  93. });
  94. });
  95. setResult(d);
  96. `,
  97. 一级:`js:
  98. let d = [];
  99. let jsondata = [];
  100. let videoList = [];
  101. if (/v1\\.vod/.test(HOST)) {
  102. input = input.replace('video','v1.vod').replace('tid','type').replace('pg=','page=');
  103. jsondata = JSON.parse(request(input));
  104. videoList = jsondata.data.list;
  105. } else {
  106. input = HOST + '/'+ input.split('/')[4];
  107. jsondata = JSON.parse(request(input));
  108. videoList = jsondata.list || jsondata.data;
  109. }
  110. // log('videoList =========> '+stringify(videoList));
  111. videoList.forEach(it => {
  112. d.push({
  113. url:it.vod_id,
  114. title:it.vod_name,
  115. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  116. desc:it.vod_remarks,
  117. });
  118. });
  119. setResult(d);
  120. `,
  121. 二级:`js:
  122. if (/v1\\.vod/.test(HOST)) {
  123. input = HOST + '/'+ input.split('/')[3];
  124. } else {
  125. input = HOST + '/'+ input.split('/')[3].replace('detail','video_detail').replace('vod_id','id');
  126. }
  127. try {
  128. let html = request(input);
  129. html = JSON.parse(html);
  130. let node = /xgapp/.test(HOST) ? html.data.vod_info : html.data;
  131. VOD = {
  132. vod_id: node.vod_id,
  133. vod_name: node.vod_name,
  134. vod_pic: node.vod_pic,
  135. type_name: node.vod_class,
  136. vod_year: node.vod_year,
  137. vod_area: node.vod_area,
  138. vod_remarks: node.vod_remarks,
  139. vod_actor: node.vod_actor,
  140. vod_director: node.vod_director,
  141. vod_content: node.vod_content.strip()
  142. };
  143. if (typeof play_url === 'undefined') {
  144. var play_url = ''
  145. }
  146. var name = {
  147. 'bfzym3u8': '暴风',
  148. '1080zyk': '优质',
  149. 'kuaikan': '快看',
  150. 'lzm3u8': '量子',
  151. 'ffm3u8': '非凡',
  152. 'haiwaikan': '海外看',
  153. 'gsm3u8': '光速',
  154. 'zuidam3u8': '最大',
  155. 'bjm3u8': '八戒',
  156. 'snm3u8': '索尼',
  157. 'wolong': '卧龙',
  158. 'xlm3u8': '新浪',
  159. 'yhm3u8': '樱花',
  160. 'tkm3u8': '天空',
  161. 'jsm3u8': '极速',
  162. 'wjm3u8': '无尽',
  163. 'sdm3u8': '闪电',
  164. 'kcm3u8': '快车',
  165. 'jinyingm3u8': '金鹰',
  166. 'fsm3u8': '飞速',
  167. 'tpm3u8': '淘片',
  168. 'lem3u8': '鱼乐',
  169. 'dbm3u8': '百度',
  170. 'tomm3u8': '番茄',
  171. 'ukm3u8': 'U酷',
  172. 'ikm3u8': '爱坤',
  173. 'hnzym3u8': '红牛资源',
  174. 'hnm3u8': '红牛',
  175. '68zy_m3u8': '68',
  176. 'kdm3u8': '酷点',
  177. 'bdxm3u8': '北斗星',
  178. 'qhm3u8': '奇虎',
  179. 'hhm3u8': '豪华',
  180. 'kbm3u8': '快播'
  181. };
  182. let episodes = /v1\\.vod/.test(HOST)?node.vod_play_list:node.vod_url_with_player;
  183. if (episodes != '') {
  184. let playMap = {};
  185. let arr = [];
  186. episodes.forEach(ep => {
  187. let from = [];
  188. if (/v1\\.vod/.test(HOST)) {
  189. from = ep.player_info.from||ep.player_info.show||ep.from||ep.show;
  190. } else {
  191. from = ep.code||ep.name;
  192. }
  193. if (!playMap.hasOwnProperty(from)) {
  194. playMap[from] = []
  195. }
  196. let parse_api = '';
  197. if (/v1\\.vod/.test(HOST)) {
  198. parse_api = ep.player_info.parse != null ? ep.player_info.parse : ep.player_info.parse2;
  199. // parse_api = /,/.test(parse_api) ? parse_api.split(',')[1] : parse_api;
  200. } else {
  201. parse_api = ep.parse_api;
  202. }
  203. log('parse_api =========> '+parse_api);
  204. if (parse_api != null && !/\\.m3u8|\\.mp4/.test(ep.url)) {
  205. parse_api = parse_api.replaceAll('..','.') ;
  206. ep.url = ep.url.replaceAll('$','$'+parse_api);
  207. }
  208. if (from != null) playMap[from].push(ep.url)
  209. });
  210. for (var key in playMap) {
  211. if ('bfzym3u8' == key) {
  212. arr.push({
  213. flag: name[key],
  214. url: playMap[key],
  215. sort: 1
  216. })
  217. } else if ('1080zyk' == key) {
  218. arr.push({
  219. flag: name[key],
  220. url: playMap[key],
  221. sort: 2
  222. })
  223. } else if ('kuaikan' == key) {
  224. arr.push({
  225. flag: name[key],
  226. url: playMap[key],
  227. sort: 3
  228. })
  229. } else if ('lzm3u8' == key) {
  230. arr.push({
  231. flag: name[key],
  232. url: playMap[key],
  233. sort: 4
  234. })
  235. } else if ('ffm3u8' == key) {
  236. arr.push({
  237. flag: name[key],
  238. url: playMap[key],
  239. sort: 5
  240. })
  241. } else if ('snm3u8' == key) {
  242. arr.push({
  243. flag: name[key],
  244. url: playMap[key],
  245. sort: 6
  246. })
  247. } else if ('qhm3u8' == key) {
  248. arr.push({
  249. flag: name[key],
  250. url: playMap[key],
  251. sort: 7
  252. })
  253. } else {
  254. arr.push({
  255. flag: name[key] ? name[key] : key,
  256. url: playMap[key],
  257. sort: 8
  258. })
  259. }
  260. }
  261. arr.sort((a, b) => a.sort - b.sort);
  262. let playFrom = [];
  263. let playList = [];
  264. arr.map(val => {
  265. if (!/undefined/.test(val.flag)) {
  266. playFrom.push(val.flag);
  267. playList.push(val.url);
  268. }
  269. })
  270. VOD.vod_play_from = playFrom.join('$$$');
  271. VOD.vod_play_url = playList.join('$$$');
  272. } else {
  273. VOD.vod_play_from = node.vod_play_from;
  274. VOD.vod_play_url = node.vod_play_url;
  275. }
  276. } catch (e) {
  277. log("获取二级详情页发生错误:" + e.message);
  278. }
  279. `,
  280. 搜索:`js:
  281. let d = [];
  282. let jsondata = [];
  283. let videoList = [];
  284. if (/v1\\.vod/.test(HOST)) {
  285. input = (HOST + '/'+ input.split('/')[3]).replace('/search','').replace('text=','wd=').replace('pg=','page=');
  286. jsondata = JSON.parse(request(input));
  287. videoList = jsondata.data.list;
  288. } else {
  289. input = HOST + '/'+ input.split('/')[3]
  290. jsondata = JSON.parse(request(input));
  291. videoList = jsondata.list || jsondata.data;
  292. }
  293. // log('videoList =========> '+stringify(videoList));
  294. videoList.forEach(it => {
  295. d.push({
  296. url:it.vod_id,
  297. title:it.vod_name,
  298. img:it.vod_pic.startsWith('http') ? it.vod_pic : it.vod_pic.startsWith('//') ? 'https:' + it.vod_pic : it.vod_pic.startsWith('/') ? getHome(HOST) + it.vod_pic : getHome(HOST) + '/' + it.vod_pic,
  299. desc:it.vod_remarks,
  300. });
  301. });
  302. setResult(d);
  303. `,
  304. }